﻿using System.Collections.Generic;
using Yun.Interface;
using Yun.Response;
using Yun.Util;

namespace Yun.Trade.Request
{
    /// <summary>
    /// 买家退货
    /// yun.trade.refund.returngoods
    /// </summary>
    public class ReturnGoodsRequest: ITopRequest<IntResultResponse>
    {
        /// <summary>
        /// 退款单编号
        /// </summary>
        public long OrderRefundId { get; set; }

        /// <summary>
        /// 凭证照片,多个用英文逗号隔开
        /// </summary>
        public string Images { get; set; }

        /// <summary>
        /// 备注留言
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 发货信息
        /// </summary>
        public string DeliverGoodsInfo { get; set; }


        public string GetApiName()
        {
            return "yun.trade.refund.returngoods";
        }

        public IDictionary<string, string> GetParameters()
        {
            var parameters = new YunDictionary
            {
                {"orderrefundid",OrderRefundId},
                {"images",Images},
                {"remark",Remark},
                {"delivergoodsinfo",DeliverGoodsInfo}
            };
            return parameters;
        }

        public void Validate()
        {
            RequestValidator.ValidateRequired("orderrefundid", OrderRefundId);
            RequestValidator.ValidateRequired("delivergoodsinfo", DeliverGoodsInfo);
        }
    }
}
